<div>
  <form class="form-horizontal" role="form" novalidate name="myForm">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:190px;" ng-class="{'shou':!avgTradTime.showSearchPanel}">
        <div>
          <label style="width:70px">业务线</label>
          <md-select ng-model="avgTradTime.param.businessLineCode" ng-change="avgTradTime.getTradType()">
            <md-option ng-value="bl.businessLineCode" ng-repeat="bl in avgTradTime.businessLineList">
              {{bl.businessLineName}}
            </md-option>
          </md-select>
        </div>
        <div>
          <label style="width:70px">交易类型</label>
          <md-select multiple ng-model="avgTradTime.param.tradTypeCode">
            <md-select-label>
              {{avgTradTime.param.tradTypeCode.length ?
              _getNames(avgTradTime.param.tradTypeCode,'tradName',avgTradTime.tradTypeList) :'全部'}}
            </md-select-label>
            <md-option ng-value="" ng-click="_checkAll(avgTradTime.param,'tradTypeCode')">全部</md-option>
            <md-option ng-value="bt" ng-repeat="bt in avgTradTime.tradTypeList">{{bt.tradName}}</md-option>
          </md-select>
        </div>
        <div>
          <md-input-container flex>
            <label>帐期</label>
            <input type="date" required name="startTime" ng-model="avgTradTime.param.date"  time-date='date'>

            <div ng-messages="myForm.startTime.$error">
              <div ng-message="date">请正确输入时间</div>
              <div ng-message="required">必填</div>
              <div ng-message="too-great">时间必须小于当前时间</div>
            </div>
          </md-input-container>
        </div>
      </div>
      <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show="avgTradTime.showSearchPanel"
        ng-hide="myForm.$invalid || !avgTradTime.showArrow" ng-click="avgTradTime.hideSearchPanel()" ></i>
      <md-button ng-disabled="myForm.$invalid" ng-click="avgTradTime.search()"
                 class="md-fab md-primary md-hue-1"
                 aria-label="Profile">
        <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;" ng-show="!avgTradTime.showSearchPanel"></i>
        <i class="glyphicon glyphicon-search" ng-show="avgTradTime.showSearchPanel"></i>
      </md-button>
    </div>
  </form>
  <div class="table-info">
    <div class="menus" ng-show="avgTradTime.showIcon">
      <md-button aria-label="列表" id="ta" ng-click="avgTradTime.changeViewType('table')" class="md-raised ico-btn">
        <img src="images/tables.png">
      </md-button>
      <md-button aria-label="图表" id="cha" ng-click="avgTradTime.changeViewType('chart')" class="md-raised ico-btn">
        <img src="images/charts.png">
      </md-button>
      <form action="{{exportUrl}}" target="_black" method="post"
            style="display: initial;">
        <input type="hidden" name="data" value="{{avgTradTime.sendData}}">
        <md-button type="submit" class="md-raised">导出Excel</md-button>
      </form>
    </div>
    <div ng-show="avgTradTime.viewType === 'chart'" style="padding: 0 16px;">
      <div id="avgTradTimeChart" style="position:relative; height:450px; width:1197px;"></div>
    </div>
    <div ng-cloak ng-show="avgTradTime.viewType === 'table'">
      <div class="table-detail">
        <div class="t_r" style="overflow-x: scroll;">
          <div style="width: 100%; line-height: 18px; font-size: 18px; text-align: center; font-weight: bold;">
            {{avgTradTime.title}}
          </div>
          <table class="table table-bordered"
                 style="min-width: 100%;max-width: none;table-layout: fixed;word-break:break-all;">
            <caption style="text-align:center;font-size:large;font-weight:bold;color:black">{{title}}</caption>
            <thead>
            <tr>
              <th rowspan="2" width="100px;" class="diffcount-td">时刻</th>
              <th rowspan="2" width="100px;" class="diffcount-td">业务线</th>
              <th colspan="{{avgTradTime.param.tradTypeName.length}}">平均交易耗时(ms)</th>
            </tr>
            <tr>
              <th ng-repeat="name in avgTradTime.param.tradTypeName track by $index">{{name}}</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="data in avgTradTime.dataList">
              <td width="100px;" class="diffcount-td" ng-repeat="d in data track by $index">
                <div style="width:100%;">{{d}}</div>
              </td>
            </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
</div>